#!/bin/sh
mvn clean package install -f ../ynot-util/pom.xml
mvn clean package install -f ../ynot-core/pom.xml
mvn clean package install -f ../ynot-impl/pom.xml
mvn clean package install -f ../ynot-lang/pom.xml
mvn clean package install -f ../ynot-vm/pom.xml

rm -f ./lib/*.jar
rm -f ./dictionaries/ynot/lib/*
rm -f ./*.jar

mvn dependency:copy-dependencies -f ../ynot-vm/pom.xml
cp ../ynot-vm/target/dependency/*.jar ./lib/.
rm -f ./lib/ynot-core*.jar

mvn eclipse:clean eclipse:eclipse package -f ../ynot-util/pom.xml
mvn eclipse:clean eclipse:eclipse package -f ../ynot-core/pom.xml
mvn eclipse:clean eclipse:eclipse package -f ../ynot-impl/pom.xml
mvn eclipse:clean eclipse:eclipse package -f ../ynot-lang/pom.xml
mvn eclipse:clean eclipse:eclipse package -f ../ynot-vm/pom.xml

mv ../ynot-core/target/*.jar ./lib/.
mv ../ynot-lang/target/*.jar ./dictionaries/ynot/lib/.
mv ../ynot-vm/target/*.jar .